<?php
	$name="";
	if (isset($_GET['id_topic'])){
		$topic = $this->getTopic ($_GET['id_topic']);
		$name=$topic['name'];
	}
?>
<div class="grid_10">
	<div class="box round first fullpage">
	<?php if (isset($_GET['id_topic'])):?>
		<h2>Edit Topic</h2>
	<?php else:?>	
		<h2>Add Topic</h2>
	<?php endif;?>
                <div class="block" id="form_add_topic">
                    <form action="<?php echo Epic::getUrl("admin/topic/addTopic") ?>" method="post">
					
                    <table class="form">
                        <tr>
                            <td>
                                <label>
                                    Name</label>
                            </td>
                            <td>
								<?php if (isset($_GET['id_topic'])):?>
									<input type="hidden" name="id_topic" value="<?php echo $_GET['id_topic']?>"/>
								<?php endif;?>
                                <input type="text" class="mini" name="name" value="<?php echo $name?>"/>
                            </td>
                        </tr>
                        <tr>
							<td style="vertical-align: top; padding-top: 9px;">
								<label>
									</label>
							</td>
							<td>
								<button class="btn" type="submit">Submit</button>
							</td>
						</tr>
                    </table>
                    </form>
                </div>
</div>
</div>